package Dao;

import entiy.User;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 * Created by lxl on 2016/5/2.
 */
@Repository
@Transactional
public class UserDao {

    @PersistenceContext
    private EntityManager entityManager ;


    public void save(User user){

        entityManager.persist(user);


    }

}
